/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.src.ptit.javatraining.huynh.btvn2;

import java.io.BufferedReader;
import java.io.FileReader;

/**
 *
 * @author user
 */
public class Bai9 {
    public static void main(String[] args) {
                String s;
        int pos = 0,strlen = 0;
        try{
            FileReader f5 = new FileReader("Bai9.in");
            BufferedReader fin = new BufferedReader(f5);
            s = fin.readLine();
            if(s.length()<1) throw new Exception("Xau rong !");
            while(s.indexOf("  ")!=-1) s = s.replaceAll("  "," ");
            String s1[] = s.split(" ");
            for(int i=0;i<s1.length;i++) {
                if(s1[i].length()>strlen) {
                    pos = i;
                    strlen = s1[i].length();
                }
            }
            System.out.println("Tu dai nhat o vi tri "+(pos+1));
        } catch(Exception e){
            System.out.println("Error "+e);
        }
    }
  }
    
